import React from "react";
import { Image } from "react-vant";
import { searchRed } from "../../utils/index";
class ListItem extends React.Component {
  render() {
    const { v, text } = this.props;
    return (
      <dl key={v.id} className="list-item">
        <dt>
          <Image src={v.image} alt="" lazyload style={{ width: 150 }} />
        </dt>
        <dd>
          <h3
            dangerouslySetInnerHTML={{ __html: searchRed(text, v.title) }}
          ></h3>
          <p dangerouslySetInnerHTML={{ __html: searchRed(text, v.word) }}></p>
          <div
            dangerouslySetInnerHTML={{ __html: searchRed(text, v.type) }}
          ></div>
        </dd>
      </dl>
    );
  }
}

export default ListItem;
